import type {HospitalDetailRes,HospitalDepartmentRes,HospitalWorkRes,DocterListRes,VisitsInfoRes,DocterInfoData} from '@/api/hospitaldetails/type'
// 统一管理首页模块接口
import request from "@/utils/request";
// 通过枚举管理首页模块的接口地址
enum API {
  // 获取医院详情接口地址
  HospitalDetail = "/hosp/hospital/",
  //获取医院科室接口地址
  HospitalDepartment="hosp/hospital/department/",
  //获取某个医院某一科室可预约排班数据
  HospitalWork="hosp/hospital/auth/getBookingScheduleRule/",
  //获取医生排班数据
  DocterList="/hosp/hospital/auth/findScheduleList/",
  //获取账号的就诊人信息
  VisitsInfo="/user/patient/auth/findAll",
  //获取医生信息
  DocterInfo="/hosp/hospital/getSchedule/"
}
//医院详情
export const HospitalDetail=(hoscode:string)=>request.get<any,HospitalDetailRes>(API.HospitalDetail + hoscode)
//科室接口
export const HospitalDepartment=(hoscode:string)=>request.get<any,HospitalDepartmentRes>(API.HospitalDepartment + hoscode)
//科室预约接口
export const HospitalWork=(page:number,limit:number,hoscode:string,depcode:string)=>request.get<any,HospitalWorkRes>(API.HospitalWork + `${page}/${limit}/${hoscode}/${depcode}`)
//医院医生排班接口
export const DocterList=(hoscode:string,depcode:string,workDate:string)=>request.get<any,DocterListRes>(API.DocterList + `${hoscode}/${depcode}/${workDate}`)
//就诊人接口
export const VisitsInfo=()=>request.get<any,VisitsInfoRes>(API.VisitsInfo)

//获取医生信息
export const DocterInfo=(scheduleId:string)=>request.get<any,DocterInfoData>(API.DocterInfo +scheduleId)